/**
 * 
 */
package cn.iune.erp.inventory;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

/**
 * @author Administrator
 *
 */
@Entity
@Table(name="StocktakingDetail",uniqueConstraints={@UniqueConstraint(name="stocktakingDetail1", columnNames={"documentNo", "serialNo", "enterpriseNo"})})
@NamedQuery(name="StocktakingDetail.findAll", query="SELECT s FROM StocktakingDetail s")
public class StocktakingDetail  {


	@Id
	@Column(length=36)
	private String fID;
	
	@Column(length=32)
	private String systemCode;
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;
	private Date orderDate;
	@Column(length=10)
	private String state = "active";
	@Column(length=10)
	private String status = "open";
	@Column(length=10)
	private String audit = "active";

	private Date confirmDate;
	
	@Column(length=15)
	private String documentNo;

	@Column(length=5)
	private String serialNo;
	@Column(length=32)
	private String fMasterID;
	
	@Column(length=32)
	private String factoryID;
	@Column(length=15)
	private String factoryNo;
	@Column(length=20)
	private String factoryName;
	
	@Column(length=3)
	private String storageType;
	@Column(length=20)
	private String storageTypeLabel;
	//库位ID
	@Column(length=32)
	private String storageID;
	@Column(length=32)
	private String storageNo;
	@Column(length=20)
	private String storageName;
	@Column(length=128)
	private String floorNo;
	//仓库ID
	@Column(length=32)
	private String storehouseID;
	
	
	@Column(length=32,nullable=true)
	private String itemID;
	@Column(length=30)
	private String itemNo;
	@Column(length=100)
	private String itemName;
	@Column(length=512)
	private String itemProperty;// = "*****";
	@Transient
	private String itemDescribe;
	@Column(length=15)
	private String unitCode;
	@Column(length=20)
	private String unitName;
	
	private int batchFlag = 0;//批号盘点
	@Column(length=20)
	private String batchNo;
	@Column(length=50)
	private String batchDescribe;
	

	//账面数量
	@Column(precision=10,scale=2)
	private BigDecimal bookQuantity = BigDecimal.ZERO;
	//盘点数量
	@Column(precision=10,scale=2)
	private BigDecimal takeQuantity = BigDecimal.ZERO;

	//账面包装数量
	@Column(precision=10,scale=2)
	private BigDecimal bookPackage = BigDecimal.ZERO;
	//盘点包装数量
	@Column(precision=10,scale=2)
	private BigDecimal takePackage = BigDecimal.ZERO;

	
	@Column(length=256)
	private String employeeNo;
	@Column(length=256)
	private String employeeName;

	@Column(length=255)
	private String comments;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getAudit() {
		return audit;
	}
	public void setAudit(String audit) {
		this.audit = audit;
	}
	public Date getConfirmDate() {
		return confirmDate;
	}
	public void setConfirmDate(Date confirmDate) {
		this.confirmDate = confirmDate;
	}
	public String getDocumentNo() {
		return documentNo;
	}
	public void setDocumentNo(String documentNo) {
		this.documentNo = documentNo;
	}
	public String getSerialNo() {
		return serialNo;
	}
	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}
	public String getfMasterID() {
		return fMasterID;
	}
	public void setfMasterID(String fMasterID) {
		this.fMasterID = fMasterID;
	}
	public String getFactoryID() {
		return factoryID;
	}
	public void setFactoryID(String factoryID) {
		this.factoryID = factoryID;
	}
	public String getFactoryNo() {
		return factoryNo;
	}
	public void setFactoryNo(String factoryNo) {
		this.factoryNo = factoryNo;
	}
	public String getFactoryName() {
		return factoryName;
	}
	public void setFactoryName(String factoryName) {
		this.factoryName = factoryName;
	}
	public String getStorageType() {
		return storageType;
	}
	public void setStorageType(String storageType) {
		this.storageType = storageType;
	}
	public String getStorageTypeLabel() {
		return storageTypeLabel;
	}
	public void setStorageTypeLabel(String storageTypeLabel) {
		this.storageTypeLabel = storageTypeLabel;
	}
	public String getStorageID() {
		return storageID;
	}
	public void setStorageID(String storageID) {
		this.storageID = storageID;
	}
	public String getStorageNo() {
		return storageNo;
	}
	public void setStorageNo(String storageNo) {
		this.storageNo = storageNo;
	}
	public String getStorageName() {
		return storageName;
	}
	public void setStorageName(String storageName) {
		this.storageName = storageName;
	}
	public String getFloorNo() {
		return floorNo;
	}
	public void setFloorNo(String floorNo) {
		this.floorNo = floorNo;
	}
	public String getStorehouseID() {
		return storehouseID;
	}
	public void setStorehouseID(String storehouseID) {
		this.storehouseID = storehouseID;
	}
	public String getItemID() {
		return itemID;
	}
	public void setItemID(String itemID) {
		this.itemID = itemID;
	}
	public String getItemNo() {
		return itemNo;
	}
	public void setItemNo(String itemNo) {
		this.itemNo = itemNo;
	}
	public String getItemName() {
		return itemName;
	}
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	public String getItemProperty() {
		return itemProperty;
	}
	public void setItemProperty(String itemProperty) {
		this.itemProperty = itemProperty;
	}
	public String getItemDescribe() {
		return itemDescribe;
	}
	public void setItemDescribe(String itemDescribe) {
		this.itemDescribe = itemDescribe;
	}
	public String getUnitCode() {
		return unitCode;
	}
	public void setUnitCode(String unitCode) {
		this.unitCode = unitCode;
	}
	public String getUnitName() {
		return unitName;
	}
	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}
	public int getBatchFlag() {
		return batchFlag;
	}
	public void setBatchFlag(int batchFlag) {
		this.batchFlag = batchFlag;
	}
	public String getBatchNo() {
		return batchNo;
	}
	public void setBatchNo(String batchNo) {
		this.batchNo = batchNo;
	}
	public String getBatchDescribe() {
		return batchDescribe;
	}
	public void setBatchDescribe(String batchDescribe) {
		this.batchDescribe = batchDescribe;
	}
	public BigDecimal getBookQuantity() {
		return bookQuantity;
	}
	public void setBookQuantity(BigDecimal bookQuantity) {
		this.bookQuantity = bookQuantity;
	}
	public BigDecimal getTakeQuantity() {
		return takeQuantity;
	}
	public void setTakeQuantity(BigDecimal takeQuantity) {
		this.takeQuantity = takeQuantity;
	}
	public BigDecimal getBookPackage() {
		return bookPackage;
	}
	public void setBookPackage(BigDecimal bookPackage) {
		this.bookPackage = bookPackage;
	}
	public BigDecimal getTakePackage() {
		return takePackage;
	}
	public void setTakePackage(BigDecimal takePackage) {
		this.takePackage = takePackage;
	}
	public String getEmployeeNo() {
		return employeeNo;
	}
	public void setEmployeeNo(String employeeNo) {
		this.employeeNo = employeeNo;
	}
	public String getEmployeeName() {
		return employeeName;
	}
	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}




}
